﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/design.Master" CodeBehind="Blogs.aspx.vb" Inherits="CakeThatIBaked.Blogs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="theheader">
    <asp:Label ID="lbl_name" runat="server" Text="Label"></asp:Label>
        's Blog
    </div>
    <div class="thecontainer">
        
        <asp:ListView ID="ListView1" runat="server" DataKeyNames="ID" 
            DataSourceID="SqlDataSource1">
                       
            <EmptyDataTemplate>
                <span>Sorry this Blog contains no post</span>
            </EmptyDataTemplate>

            <ItemTemplate>
                <span style="font-size: 12px;">
                
                <asp:Label ID="BlogTitleLabel" runat="server" Text='<%# Eval("BlogTitle") %>' style="font-family:'Bad Script', cursive;font-size: 24px;" />
                
                <br />
                By <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("UserName") %>' style="" /> on <asp:Label ID="Label1" runat="server" Text='<%# Eval("CreatedDate") %>' style="font-size=8px" />
                <br />
                               
                <asp:Label ID="BlogContentLabel" runat="server" Text='<%# Eval("BlogContent") %>' style="font-family:'Bad Script', cursive;font-size: 20px;" />
                <br />
                
            </span>
            </ItemTemplate>
            
            <LayoutTemplate>
                <div ID="itemPlaceholderContainer" runat="server" style="">
                    <span runat="server" id="itemPlaceholder" />
                </div>
                <div style="">
                    <asp:DataPager ID="DataPager1" runat="server">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                ShowLastPageButton="True" />
                        </Fields>
                    </asp:DataPager>
                </div>
            </LayoutTemplate>
            
            
            <SelectedItemTemplate>
                <span style="">
                
                </span>
            </SelectedItemTemplate>
        
        
        </asp:ListView>
        
        
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:CakeConnection %>" 
            ProviderName="<%$ ConnectionStrings:CakeConnection.ProviderName %>" 
            
            SelectCommand="SELECT [ID], [Author], [BlogTitle], [BlogContent], [CreatedDate], [UserName] FROM [TotalBlog] WHERE ([Author] = ?) ORDER BY [CreatedDate]">
            <SelectParameters>
                <asp:QueryStringParameter Name="Author" QueryStringField="uno" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        
    </div>

</asp:Content>
